package org.itboys.admin.entity.lasted;


import org.mongodb.morphia.annotations.Entity;

import java.util.List;
import org.itboys.mongodb.entity.BaseMongoEntity;
/**
 * 作者：jiangxiong
 * 日期：2017年2月8日
 * 联系方式 ：empty90911@126.com
 * 描述：系统-组织。重新构建
 *
 */
@Entity(value="SystemOrg", noClassnameStored = true)
public class SystemOrg extends BaseMongoEntity {

	private static final long serialVersionUID = -8154137735838895198L;
	private String number;//组织编号
	private String mobile;//联系电话
	private String mobileName;//联系人
	private String name;//组织名称
	
	private Long parentId;//上级组织ID
	
	private Integer sort;//排序字段

	private String key;//组织KEY

	private String desc;//组织描述
	
	private Integer isDeleted = 0;//逻辑删除标记 0有效 1删除

	private List<SystemOrg> children;


	public SystemOrg() {
	}

	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getMobileName() {
		return mobileName;
	}

	public void setMobileName(String mobileName) {
		this.mobileName = mobileName;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getParentId() {
		return parentId;
	}

	public void setParentId(Long parentId) {
		this.parentId = parentId;
	}

	public Integer getSort() {
		return sort;
	}

	public void setSort(Integer sort) {
		this.sort = sort;
	}

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	@Override
	public Integer getIsDeleted() {
		return isDeleted;
	}

	@Override
	public void setIsDeleted(Integer isDeleted) {
		this.isDeleted = isDeleted;
	}

	public List<SystemOrg> getChildren() {
		return children;
	}

	public void setChildren(List<SystemOrg> children) {
		this.children = children;
	}

	public  boolean getExpanded(){
		if(children!=null&&children.size()>0){
			return true;
		}else{
			return false;
		}
	}
}
